import java.util.Random;
import java.util.Scanner;

/**
 * Created by dllo on 18/3/31.
 */
public class Test骰子 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Random random = new Random();
        int money = 5000;
        while (money != 0) {
            int a = random.nextInt(6) + 1;
            int b = random.nextInt(6) + 1;
            int c = random.nextInt(6) + 1;
            int sum = a + b + c;
            System.out.println("猜大小" + 1 + ":大"+"," + 2 + ":小");
            int d = scanner.nextInt();
            switch (d) {
                case 1:
                    if (sum < 10) {
                        System.out.println(a + "." + b + "." + c + ":" +sum+ ","+ "小" + "," + "你输了");
                        money = money - 5000;
                        System.out.println("剩余金钱为"+money);
                    } else {
                        System.out.println(a + "." + b + "." + c + ":"+sum + ","+ "大" + "," + "你赢了");
                        money = money + 5000;
                        System.out.println("剩余金钱为"+money);
                    }
                    break;
                case 2:
                    if (sum < 10) {
                        System.out.println(a + "." + b + "." + c + ":" +sum + ","+"小" + "," + "你赢了");
                        money = money + 5000;
                        System.out.println("剩余金钱为"+money);
                    } else {
                        System.out.println(a + "." + b + "." + c + ":" +sum+ ","+ "大" + "," + "你输了");
                        money = money - 5000;
                        System.out.println("剩余金钱为"+money);
                    }
            }
        }
        System.out.println("余额不足,请充值");
    }

}

